package com.course.result;

public class ResultCode {
    private int code;
    private String msg;
    /**
     * 通用错误码
     */
    public static ResultCode SUCCESS = new ResultCode(200, "success");
    public static ResultCode SERVER_ERROR = new ResultCode(500100, "服务端异常");
    public static ResultCode BIND_ERROR = new ResultCode(500101, "参数校验异常：%s");
    public static ResultCode ACCESS_LIMIT_REACHED= new ResultCode(500104, "访问高峰期，请稍等！");
    public static ResultCode COURSE_OVER = new ResultCode(500500, "课程已满");
    public static ResultCode REPEATE_SECKILL = new ResultCode(500501, "不能重复选择");
    public static ResultCode WRITE_ISTRUE = new ResultCode(0, "等待确认中");
    private ResultCode(){}
    private ResultCode(int code,String msg){
        this.code = code;
        this.msg = msg;
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
